package com.cqhilink.iot.jobstandardmanagement.facade.utils;

import java.io.PrintWriter;
import java.io.StringWriter;

/**
 * Created by jiangjx on 2017/1/13.
 */
public class OutputErrorToLog {

    /**
     * 将异常的堆栈信息输出转成字符格式
     */
    public static String returnStr(Exception e) {
        StringWriter sw = new StringWriter();
        e.printStackTrace(new PrintWriter(sw, true));
        return sw.toString();
    }
}
